import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common';
import { UserService,UserRo } from './user.service';
@Controller('user')
export class UserController {
  constructor(private readonly UserService: UserService) {}

  @Post('regist')
   async create(@Body() body:any) {
    return await this.UserService.create(body);
  }
  @Get()
  async findAll() {
    return await this.UserService.findAll();
  }
  @Post('login')
  async login(@Body() body:any) {
    return await this.UserService.login(body);
  }
  @Post('like')
  async like(@Body() body:any){
    return await this.UserService.like(body);
  }
  // 返回id数组
  @Post('getOnelike')
  async getLike(@Body() body:any){
    return await this.UserService.getLike(body);
  }
}
